package cn.edu.scau.cmi.pengzhijie.simpleFacoryMethod;

import cn.edu.scau.cmi.pengzhijie.simpleFacoryMethod.domain.Beef;
import cn.edu.scau.cmi.pengzhijie.simpleFacoryMethod.domain.Chicken;
import cn.edu.scau.cmi.pengzhijie.simpleFacoryMethod.domain.Meat;
import cn.edu.scau.cmi.pengzhijie.simpleFacoryMethod.domain.Pork;

public class MeatFactory {
	public static Meat getMeat(String meatType) {
		Meat meat = null;
		switch (meatType) {
		case "beef":
			meat = new Beef();
			break;
		case "chicken":
			meat = new Chicken();
			break;
		case "pork":
			meat = new Pork();
			break;
		default:
			System.out.println("没有你要创建的肉类");
		}
		return meat;
	}
}
